#include"comm.hpp"
#include <string.h>
#include"log.hpp"
int main()
{

    //测试日志
    Log l;
    l.get_time();

    int fd=open(PATH,O_WRONLY);
    if(fd==-1)
    {
        perror("open");
        exit(-1);
    }

    char buff[SIZE];
    while(true)
    {   
        memset(buff,'\0',SIZE);
        cout<<"import enter:";
        cin.getline(buff,SIZE);
        //write(fd,buff,strlen(buff));
        write(fd,buff,sizeof(buff));
        //memset(buff,'\0',SIZE);
    }

    close(fd);

    return 0;
}
